/**
 * File MASCreationException.java created by Pablo Díaz Fernández
 * on 27/10/2011 for the project supply-chain-simulator
 */
package org.lsk.pfc.scsim.model.exception;

import org.lsk.pfc.scsim.model.messages.ExceptionMessageHelper;

/**
 * Exception creating multi agent system.
 * 
 * @author Pablo Díaz Fernández
 */
public final class MASCreationException extends ModelException {

	/**
	 * Serial version ID.
	 */
	private static final long serialVersionUID = -4211076932316616554L;

	/**
	 * Key that references the message for the agent exception.
	 */
	private static final String MESSAGE_KEY = "exception.mas.creation";

	/**
	 * Constructor for the exception.
	 * 
	 * @param agentName
	 *            Agent name that causes the exception.
	 * 
	 * @param cause
	 *            Exception cause.
	 */
	public MASCreationException(final String agentName, final Throwable cause) {
		super(ExceptionMessageHelper.createMessage(MESSAGE_KEY, agentName),
		        cause);
	}
}
